/*
 * ResizeHandle.java
 *
 * Created on 18 maart 2008, 14:58
 *
 * @author wijnand.schepens@hogent.be
 */

package diagram.handles;

import diagram.locations.RigidRelativeLocation;
import diagram.locations.LowerRightLocation;
import diagram.Node;

/**
 * convenience class 
 */
public class ResizeHandle extends SquareHandle
{
    private int minSize=5; // default
    

    public ResizeHandle(){}

	public ResizeHandle(Node baseNode, int minSize)
	{
        super(baseNode , new LowerRightLocation(baseNode.getLowerRight(),new RigidRelativeLocation(baseNode.getUpperLeft(), minSize, minSize)),4);
    }
    


    /**
     * @param baseNode the baseNode to set
     */
    public void setBaseNode(Node baseNode) {
        super.setLocation(new LowerRightLocation(baseNode.getLowerRight(),new RigidRelativeLocation(baseNode.getUpperLeft(), minSize, minSize)));
        super.setSize(minSize);
        super.setBase(baseNode);
    }


    /**
     * @param minSize the minSize to set
     */
    public void setMinSize(int minSize) {
        this.minSize = minSize;
    }




}
